<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head id="Head1">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>
			支付页面
		</title>
		<link href="./css/Main.css" rel="stylesheet">
		<link href="./css/cz.css" rel="stylesheet">
		<link href="./css/style.css" rel="stylesheet">
		<link type="text/css" rel="stylesheet" href="./css/bootstrap.css">
		<link type="text/css" rel="stylesheet" href="./css/radio-banks.css">
		<link type="text/css" rel="stylesheet" href="./css/simple-radius-border.css">
    <script type="text/javascript" src="./js/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" src="./js/bootstrap.min.js"></script>
    
    <script type="text/javascript">
        function getQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
            var r = window.location.search.substr(1).match(reg);
            if (r != null)
                return unescape(r[2]);
            return "";
        }
        function SetInnerText(ctlId, content) {
            if (navigator.appName.indexOf("Explorer") > -1)
                ctlId.innerText = content;
            else
                ctlId.textContent = content;
        }

        function chkUserName() {
            if (document.getElementById("txtUser1").value == "" || document.getElementById("txtUser2").value == "") {
                SetInnerText(document.getElementById("spMoneyTips"), "用户名不能为空！");
                return false;
            }

            if (document.getElementById("txtUser1").value != document.getElementById("txtUser2").value) {
                SetInnerText(document.getElementById("spMoneyTips"), "两次填写的用户名不一致！")
                return false;
            }
            //SetInnerText(document.getElementById("spUserTips"), "*")
            SetInnerText(document.getElementById("spMoneyTips"), "")
            return true;
        }

        function chkMoney() {
            var re = /^[1-9]+[0-9]*]*$/;

            if (!re.test(document.getElementById("tranAmt").value) || parseInt(document.getElementById("tranAmt").value) < payMinMoney || parseInt(document.getElementById("tranAmt").value) > payMaxMoney) {
                SetInnerText(document.getElementById("spMoneyTips"), "请输入正确的充值金额，最低" + payMinMoney + "元，最高" + payMaxMoney + "元!")
                return false;
            }
            SetInnerText(document.getElementById("spMoneyTips"), "")
            return true;
        }

        function Submit() {
            if (!chkBank())
                return false;

            if (!chkUserName())
                return false;

            if (!chkMoney())
                return false;
            if (Chk != "1") {
                var userName = document.getElementById('txtUser1').value;
                var flag = checkUser(userName);
                if (!flag) {
                    SetInnerText(document.getElementById("spMoneyTips"), "不存在该用户名!");
                    return false;
                }
            }
            var r = confirm('为防止诈骗行为,请确认在JK平台打开充值链接,并在游戏帐号框里确认自己的帐号信息,以免帮其他帐号充值！');
            if (r == false)
                return false;
            document.getElementById('order_amount').value = document.getElementById('tranAmt').value; //add
            $('#mainForm').submit(); //add
            return true;
        }

        function chkBank() {

            var checklists = document.getElementsByName("bankCode1");
            var i = 0;
            var flag = true;
            for (i = 0; i < checklists.length; i++) {
                if (checklists[i].checked) {
                    flag = false;
                    //bankCode.val(checklists[i].value);
                    document.getElementById("bank_code").value = checklists[i].value //add
                }
            }

            if (flag) {
                SetInnerText(document.getElementById("spMoneyTips"), "请选择支付的银行！")
                return false;
            }
            SetInnerText(document.getElementById("spMoneyTips"), "")

            return true;
        }

    </script>
</head>
<body>
     
<div id="cz_header">
    <div class="cz_header">
        <div class="cz_logo"></div>
        <div id="cz_bg_div" class="cz_nav bg">
            <ul class="clearfix">
                <li><a href="javascript:void(0);" paytype="0,6,7">在线充值</a></li>
                <li><a href="javascript:void(0);" paytype="3,4">支付宝充值</a></li>
                <li><a href="javascript:void(0);" paytype="2,8">微信充值</a></li>
                <li><a href="javascript:void(0);" paytype="5">QQ充值</a></li>
            </ul>
        </div>
    </div>
</div>

<div class="cztd-wrap">
    <ul class="cztd" id="childNav">
        <li class="cur">
        	<a href="http://pf910.niuniums.com/PFSM/default.aspx?bt=2&amp;IndexId=155&amp;mmm=8454454557&amp;t=322224&amp;username=linmu2099">支付宝充值2</a></li>
        		<li>
        			<a href="http://ag98.niuniums.com/HTFKSM/default.aspx?bt=2&amp;IndexId=154&amp;mmm=8454454557&amp;t=322224&amp;username=%20linmu2099">支付宝充值3</a>
        		</li>
        		<li>
        			<a href="http://ag812.niuniums.com/ZFBSM/default.aspx?bt=2&amp;IndexId=148&amp;mmm=8454454557&amp;t=322224&amp;username=linmu2099">支付宝充值5</a>
        		</li>
        		<li>
        			<a href="http://xh819.niuniums.com/XHSM/default.aspx?bt=2&amp;IndexId=150&amp;mmm=8454454557&amp;t=322224&amp;username=linmu2099">支付宝充值4</a>
        		</li>
    </ul>
</div>

<script type="text/javascript">
    var Global_HeaderJson =[{"ID":149,"BankUrl":"http://xh819.niuniums.com/XHK/default.aspx?IndexId=149&mmm=8467890uj8457&t=322224&username=","PayClass":0,"TranferUrl":null,"ShowTitle":"在线充值1","PayMinMoney":50,"PayMaxMoney":50000,"showtype":2},
    												{"ID":137,"BankUrl":"http://db625.niuniums.com/DBK/default.aspx?bt=0&IndexId=137&mmm=8453457&t=322224&username= ","PayClass":0,"TranferUrl":null,"ShowTitle":"在线充值2","PayMinMoney":50,"PayMaxMoney":20000,"showtype":2},
    												{"ID":155,"BankUrl":"http://pf910.niuniums.com/PFSM/default.aspx?bt=2&IndexId=155&mmm=8454454557&t=322224&username=","PayClass":4,"TranferUrl":null,"ShowTitle":"支付宝充值2","PayMinMoney":101,"PayMaxMoney":5000,"showtype":2},
    												{"ID":154,"BankUrl":"http://ag98.niuniums.com/HTFKSM/default.aspx?bt=2&IndexId=154&mmm=8454454557&t=322224&username= ","PayClass":4,"TranferUrl":null,"ShowTitle":"支付宝充值3","PayMinMoney":50,"PayMaxMoney":3000,"showtype":0},
    												{"ID":141,"BankUrl":"http://www.zhizongk.top/mbk/default.aspx?bt=0&IndexId=141&mmm=8453457&t=322224&username=","PayClass":0,"TranferUrl":null,"ShowTitle":"在线充值3","PayMinMoney":50,"PayMaxMoney":20000,"showtype":2},
    												{"ID":148,"BankUrl":"http://ag812.niuniums.com/ZFBSM/default.aspx?bt=2&IndexId=148&mmm=8454454557&t=322224&username=","PayClass":4,"TranferUrl":null,"ShowTitle":"支付宝充值5","PayMinMoney":500,"PayMaxMoney":10000,"showtype":2},
    												{"ID":150,"BankUrl":"http://xh819.niuniums.com/XHSM/default.aspx?bt=2&IndexId=150&mmm=8454454557&t=322224&username=","PayClass":4,"TranferUrl":null,"ShowTitle":"支付宝充值4","PayMinMoney":500,"PayMaxMoney":3000,"showtype":2}];
    var Global_IndexId = 155;
    var Global_UserID ='linmu2099';
    var Global_Type ='4';
    var transferUrl;
    var Chk='';
    var payMinMoney=101;
    var payMaxMoney=5000;
    var isPc = 'True'

    function useMobileFun() {
        $(".cz_nav").hide()
        $("head").append('<meta name="viewport" content="width=device-width, initial-scale=1,  user-scalable=no" />');
        $("head").append('<link href="/css/Stitics/czmobile.css" rel="stylesheet" />')
    }
    
    function createShowRange(){
        document.write( "<span>充值范围："+payMinMoney+"元->"+payMaxMoney+"元</span>");
    }
    if(Chk=='1')
    {
        payMaxMoney=1000000;
    }
    document.oncontextmenu = function () { return false; }
    $(function () {
        $(".cz_nav ul li").click(function () {
            var $t = $(this);
            var pType = $t.find("a").attr('paytype');
            //if(pType.indexOf(Global_Type)>-1){
            //    return;
            //}            
            var temp = [];
            $.each(Global_HeaderJson, function (ind, content) {
                if (pType.indexOf(content.PayClass) > -1) {
                    temp.push(content);
                }
            });

            $.each(temp, function (ind, content) {
                if (ind == 0) {
                    transferUrl =$.trim( content.BankUrl )+$.trim(  Global_UserID);
                }
            });
            if(typeof(transferUrl)!='undefined')
                window.location.href = transferUrl;
        });

        if (isPc != "True") {
            useMobileFun();
        }
    });

    function checkUser(userName){
        if(userName.indexOf('=')>-1){
            return false;
        }
        var data= "userName="+userName;
        var flag=false;
        $.ajax({
            type: "POST",
            url: "/Common/Pages/CommonPage.ashx?method=checkUser",
            data:data,
            async: false,
            success: function(r){
                var json = eval("("+r+")")
                flag = (json.result=="1");
            }
        });
        return flag;
    }
</script>


    <form id="mainForm" action="#" method="post" class="form-horizontal">
        <div class="container-fluid">
        <div style=" display:none;" class="row-fluid">
            <div class="span10 offset1">
                <div style="margin-top: 4px;">
                    <!--<img src="/css/com/static/imgs/head-logo.jpg" class="img-rounded"/>-->
                </div>
                <ul class="nav nav-pills nav-stacked" style="margin-top: 2px; margin-bottom: -1px;">
                    <li class="active">
                        <a href="#" style="font-size: 18px;">订单信息</a>
                    </li>
                </ul>
                <div class="low-half-radius-border" style="padding-top: 10px;">
                    <div class="control-group">
                        <label class="control-label" style="width: 100px; font-size: 16px;"><strong>商品名称：</strong></label>
                        <div class="controls" style="margin-left: 110px; padding-top: 5px;">
                            <span><span id="label_product_name"></span>
                        </span></div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" style="width: 100px; font-size: 16px;"><strong>订单号：</strong></label>
                        <div class="controls" style="margin-left: 110px; padding-top: 5px;">
                            <span><span id="label_order_no"></span>
                        </span></div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" style="width: 100px; font-size: 16px;"><strong>金额：</strong></label>
                        <div class="controls" style="margin-left: 110px; padding-top: 5px;">
                            <span style="color: red;"><strong><span id="label_order_amount"></span></strong></span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="row-fluid">
            <div class="span10 offset1">
                <ul class="nav nav-tabs" style="display:none;">
                    <li class="active">
                        <a href="http://pf910.niuniums.com/PFSM/default.aspx?bt=2&amp;IndexId=155&amp;mmm=8454454557&amp;t=322224&amp;username=linmu2099#"><strong>在线支付</strong></a>
                    </li>
                </ul>
                <div style="border: 1px solid #ddd; margin-top:5px;">
                    <div class="container-fluid" style="padding-top:20px;">
                        <div class="row-fluid" style="padding-left: 20px; margin-bottom: 10px; display:none;">
                            <div class="span2">
                                <label class="radio">
                                    <input type="radio" name="bankCode1" checked="" class=" radio-img-bank" value="WEIXIN">微信支付
                                </label>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" style="width: 100px; font-size: 16px;"><strong>游戏帐号：</strong></label>
                            <div class="controls" style="margin-left: 110px; padding-top: 5px;">
                                <input name="txtUser1" type="text" id="txtUser1" value="linmu2099"><span style="color: red;">*</span>（用户名）
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" style="width: 100px; font-size: 16px;"><strong>确认帐号：</strong></label>
                            <div class="controls" style="margin-left: 110px; padding-top: 5px;">
                                 <input name="txtUser2" type="text" id="txtUser2" value="linmu2099"><span style="color: red;">*</span>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" style="width: 100px; font-size: 16px;"><strong>金额：</strong></label>
                            <div class="controls" style="margin-left: 110px; padding-top: 5px;">
                               <input type="text" id="tranAmt" name="tranAmt"><span style="color: red;">*</span>
                            </div>
                        </div>
                        <div class="row-fluid" style="padding-left:100px; margin-bottom: 10px;">
                            <span id="spMoneyTips" style="color:Red"></span>
                            <script type="text/javascript">
                                createShowRange();
                            </script><span>充值范围：101元-&gt;5000元</span>
                        </div>
                        <div class="row-fluid" style="padding-left:110px; margin-bottom: 20px;">
                            <input type="button" id="submitBtn" onclick="return Submit()" class="btn btn-large btn-primary" value="确认支付">
                        </div>
                         <div class="row-fluid" style="margin: 20px auto;color:red;">
                                
                         </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <input type="hidden" id="order_amount" name="order_amount">
        <input type="hidden" id="bank_code" name="bank_code">
    </form>

</body></html>